import { defineStore } from "pinia";

//注：defineStore的第一个参数必须唯一
export const useLoginStore = defineStore("login", {
  state: () => {
    return {
      tit: "hello world!",
    };
  },
  getters: {
    getTit(): string {
      return this.tit;
    },
  },
  actions: {
    setTit(value: string) {
      this.tit = value;
    },
  },
  //开启持久化
  persist: true,
});
// export default useLoginStore;
